home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-04-05 | 38.3 KB | 1,689 lines |
- (Message mh:9)
- Resent: Mon, 25 Mar 91 10:19:45 PST
- Resent: qq11@uxb.liv.ac.uk (Alan Thew)
- Resent: Mon, 18 Mar 91 12:23:23 PST
- Resent: sow@cad.luth.se (Sven-Ove Westberg)
- Resent: cenkl@linus.mitre.org (Mike Cenkl)
- Return-Path: jamesp@metolius.WR
- To: luj@ecn.purdue.edu (Jun Lu), jkm@ctt.bellcore.COM (James Mcglashan),
- jmvogtle@gamera.cns.syr.edu (John M Vogtle),
- ccw@deakin.OZ.AU (Craig Warren),
- munck@Stars.Reston.Unisys.COM (Bob Munck)
- Cc: jamesp@metolius.WR.TEK.COM (James Perkins)
- Subject: Vmailtool V1.15
- Reply-To: jamesp@metolius.WR.TEK.COM (James T. Perkins)
- X-Mailer: Rand MH 6.6 - Vmail 10/87DAS - Vmailtool V1.15 91/03/01
- Date: Mon, 11 Mar 91 12:29:39 PST
- From: James T Perkins <jamesp@metolius.WR>
- --------
-
-
- Here's vmailtool version 1.15. If you need a copy of tooltool, let me
- know. The author of tooltool is Chuck Musciano at Harris Corporation,
- but according to the documentation, I have permission to redistribute
- tooltool.
-
- ___ ___ ___
- | \ / _ \ / __| James Perkins, jamesp@metolius.wr.tek.com, (503)629-1149
- | |> || |_| |\__ \ Logic Analyzers Division, DAS 9200 Engineering
- |___/ |_| |_||___/ Tektronix, MS 92-725, PO Box 4600, Beaverton, OR 97076
-
- This package is sold by weight, not by volume. Some settling of contents may
- have occurred during shipping and handling.
-
- #! /bin/sh
- # This is a shell archive. Remove anything before this line, then unpack
- # it by saving it into a file and typing "sh file". To overwrite existing
- # files, type "sh file -c". You can also feed this as standard input via
- # unshar, or by typing "sh <file", e.g.. If this archive is complete, you
- # will see the following message at the end:
- # "End of archive 1 (of 1)."
- # Contents: MANIFEST Makefile README down left right up vmailicon
- # vmailtool vmailtool.1
- # Wrapped by jamesp@metolius on Mon Mar 11 12:18:19 1991
- PATH=/bin:/usr/bin:/usr/ucb ; export PATH
- if test -f MANIFEST -a "${1}" != "-c" ; then
- echo shar: Will not over-write existing file \"MANIFEST\"
- else
- echo shar: Extracting \"MANIFEST\" \(414 characters\)
- sed "s/^X//" >MANIFEST <<'END_OF_MANIFEST'
- X File Name Archive # Description
- X-----------------------------------------------------------
- X MANIFEST 1 This shipping list
- X Makefile 1
- X README 1
- X down 1
- X left 1
- X right 1
- X up 1
- X vmailicon 1
- X vmailtool 1
- X vmailtool.1 1
- END_OF_MANIFEST
- if test 414 -ne `wc -c <MANIFEST`; then
- echo shar: \"MANIFEST\" unpacked with wrong size!
- fi
- # end of overwriting check
- fi
- if test -f Makefile -a "${1}" != "-c" ; then
- echo shar: Will not over-write existing file \"Makefile\"
- else
- echo shar: Extracting \"Makefile\" \(962 characters\)
- sed "s/^X//" >Makefile <<'END_OF_Makefile'
- X# Vmailtool, version 1.15
- X# James T. Perkins 3/91
- X
- XBINDIR = /usr/public/bin
- XICONDIR = /usr/public/icons
- XMANDIR = /usr/public/manp/man1
- X
- XBINS = vmailtool vmailicon
- XICONS = up left right down
- XMAN = vmailtool.1
- XALLSRC = README Makefile $(BINS) $(ICONS) $(MAN)
- X
- XIBINS = $(BINDIR)/vmailtool $(BINDIR)/vmailicon
- XIICONS = $(ICONDIR)/up $(ICONDIR)/left $(ICONDIR)/right $(ICONDIR)/down
- XIMAN = $(MANDIR)/$(MAN)
- X
- Xdefault all: $(BINS) $(ICONS) $(MAN)
- X
- Xclean:
- X rm -f $(ALLSRC)
- X
- Xmakekit: $(ALLSRC)
- X makekit -m $(ALLSRC)
- X
- Xinstall: $(IBINS) $(IICONS) $(IMAN)
- X
- Xuninstall:
- X rm -f $(IBINS) $(IICONS) $(IMAN)
- X
- X$(ALLSRC):
- X $(CO) $(COFLAGS) $@
- X
- X$(BINDIR)/vmailtool: vmailtool
- X cp $? $@
- X chmod 755 $@
- X
- X$(BINDIR)/vmailicon: vmailicon
- X cp $? $@
- X chmod 755 $@
- X
- X$(ICONDIR)/up: up
- X cp $? $@
- X chmod 644 $@
- X
- X$(ICONDIR)/right: right
- X cp $? $@
- X chmod 644 $@
- X
- X$(ICONDIR)/left: left
- X cp $? $@
- X chmod 644 $@
- X
- X$(ICONDIR)/down: down
- X cp $? $@
- X chmod 644 $@
- X
- X$(IMAN): $(MAN)
- X cp $? $@
- X chmod 644 $@
- END_OF_Makefile
- if test 962 -ne `wc -c <Makefile`; then
- echo shar: \"Makefile\" unpacked with wrong size!
- fi
- # end of overwriting check
- fi
- if test -f README -a "${1}" != "-c" ; then
- echo shar: Will not over-write existing file \"README\"
- else
- echo shar: Extracting \"README\" \(2528 characters\)
- sed "s/^X//" >README <<'END_OF_README'
- X
- X VMAILTOOL V1.15
- X James T. Perkins
- X 11 March 1991
- X
- XVmailtool is a graphical mail interface for Sun workstations. It is
- Xbased on vmail, the MH mail system, tooltool, and Sunview (or
- XOpenWindows). If you do not have all of these installed on your Sun
- Xworkstation, it is useless to you.
- X
- XVmailtool is a tooltool "wrapper" around the curses-based vmail mail
- Xeditor, and provides mouse support and buttons to push for vmail, making
- Xthe use of vmail much faster and easier -- you don't have to remember
- Xall the keys for the commands. It provides a neato mail icon with a
- Xflag that pops up and down when you recieve mail. Using the mouse to
- Xselect a message for viewing is a lot faster than cursor movement keys,
- Xand vmailtool remembers argument strings which you want to pass on to
- Xcomp, forw, and repl.
- X
- XVmailtool V1.4 and later (including V1.15) is based on a modified
- Xversion of vmail, which has new commands for rescanning and sorting the
- Xmail folder, and for disting and bursting mail items.
- X
- XVmailtool does have some minor problems, which are listed in the man
- Xpage. Nonetheless, vmailtool has proved a useful and helpful tool.
- X
- XI offer vmailtool to the user community without any strings attached.
- XIf you think of a bugfix or enhancement, please let me know via email.
- X
- XJames Perkins
- Xjamesp@metolius.wr.tek.com
- X
- X
- X INSTALLATION NOTES
- X
- XTo install vmailtool will require a little effort. First decide on the
- Xfollowing directories:
- X
- X BINDIR - where the installed shell scripts will live
- X MANDIR - where the installed man page will live
- X ICONDIR - where the installed icons will live
- X
- XEdit the makefile and change the BINDIR, MANDIR, and ICONDIR parameter
- Xdefinitions.
- X
- XEdit the vmailtool shell script cand change the definitions of:
- X
- X VMAILICON - to reflect BINDIR
- X ICON_UP - to reflect ICONDIR
- X ICON_DOWN - to reflect ICONDIR
- X ICON_LEFT - to reflect ICONDIR
- X ICON_RIGHT - to reflect ICONDIR
- X
- XEdit the man page to update the new locations of vmailicon.
- X
- XEdit vmailicon and make sure that the control characters got through
- Xunmolested. There should be a line that reads:
- X
- X echo -n "<ESC>]I${icon}<ESC>\\" >/dev/tty &
- X
- XWhere <ESC> means an ASCII escape character.
- X
- XType `make install' to install vmailtool, vmailicon, the icons, and
- Xvmailtool.1. Make sure the permissions on vmailtool and vmailicon are
- X755 (read, execute by all, write by owner only), and 644 on the icons
- Xand manpage (read by all, write by owner only).
- X
- XJames
- END_OF_README
- if test 2528 -ne `wc -c <README`; then
- echo shar: \"README\" unpacked with wrong size!
- fi
- # end of overwriting check
- fi
- if test -f down -a "${1}" != "-c" ; then
- echo shar: Will not over-write existing file \"down\"
- else
- echo shar: Extracting \"down\" \(193 characters\)
- sed "s/^X//" >down <<'END_OF_down'
- X/* Format_version=1, Width=16, Height=16, Depth=1, Valid_bits_per_item=16
- X */
- X 0x0000,0x8001,0x4002,0x6006,0x300C,0x381C,0x1C38,0x1E78,
- X 0x0FF0,0x0FF0,0x07E0,0x07E0,0x03C0,0x03C0,0x0180,0x0180
- END_OF_down
- if test 193 -ne `wc -c <down`; then
- echo shar: \"down\" unpacked with wrong size!
- fi
- # end of overwriting check
- fi
- if test -f left -a "${1}" != "-c" ; then
- echo shar: Will not over-write existing file \"left\"
- else
- echo shar: Extracting \"left\" \(193 characters\)
- sed "s/^X//" >left <<'END_OF_left'
- X/* Format_version=1, Width=16, Height=16, Depth=1, Valid_bits_per_item=16
- X */
- X 0x0002,0x000C,0x0038,0x00F0,0x03E0,0x0FC0,0x3F80,0xFF00,
- X 0xFF00,0x3F80,0x0FC0,0x03E0,0x00F0,0x0038,0x000C,0x0002
- END_OF_left
- if test 193 -ne `wc -c <left`; then
- echo shar: \"left\" unpacked with wrong size!
- fi
- # end of overwriting check
- fi
- if test -f right -a "${1}" != "-c" ; then
- echo shar: Will not over-write existing file \"right\"
- else
- echo shar: Extracting \"right\" \(193 characters\)
- sed "s/^X//" >right <<'END_OF_right'
- X/* Format_version=1, Width=16, Height=16, Depth=1, Valid_bits_per_item=16
- X */
- X 0x4000,0x3000,0x1C00,0x0F00,0x07C0,0x03F0,0x01FC,0x00FF,
- X 0x00FF,0x01FC,0x03F0,0x07C0,0x0F00,0x1C00,0x3000,0x4000
- END_OF_right
- if test 193 -ne `wc -c <right`; then
- echo shar: \"right\" unpacked with wrong size!
- fi
- # end of overwriting check
- fi
- if test -f up -a "${1}" != "-c" ; then
- echo shar: Will not over-write existing file \"up\"
- else
- echo shar: Extracting \"up\" \(193 characters\)
- sed "s/^X//" >up <<'END_OF_up'
- X/* Format_version=1, Width=16, Height=16, Depth=1, Valid_bits_per_item=16
- X */
- X 0x0180,0x0180,0x03C0,0x03C0,0x07E0,0x07E0,0x0FF0,0x0FF0,
- X 0x1E78,0x1C38,0x381C,0x300C,0x6006,0x4002,0x8001,0x0000
- END_OF_up
- if test 193 -ne `wc -c <up`; then
- echo shar: \"up\" unpacked with wrong size!
- fi
- # end of overwriting check
- fi
- if test -f vmailicon -a "${1}" != "-c" ; then
- echo shar: Will not over-write existing file \"vmailicon\"
- else
- echo shar: Extracting \"vmailicon\" \(1270 characters\)
- sed "s/^X//" >vmailicon <<'END_OF_vmailicon'
- X:
- X# NAME
- X# vmailicon - set the icon for /dev/tty's window
- X#
- X# SYNOPSIS
- X# vmailicon iconfile
- X#
- X# DESCRIPTION
- X# This is the tool that vmailtool uses to raise or lower the icon
- X# flag. This tool exists because the method used to set the icon
- X# (echoing a shelltool "terminal" command string to /dev/tty)
- X# sometimes blocks forever due to a race condition. This tool can
- X# keep trying to set the icon until it finally succeeds, and it
- X# can do it in the background so vmailtool doesn't hang up.
- X#
- X# AUTHOR
- X# James Perkins 6 Feb 1991
- X
- Xcase $# in
- X 1) icon=$1;;
- X *) echo "usage: $0 iconfile" >&2; exit 1;;
- Xesac
- X
- Xif [ ! -f $icon ]
- Xthen
- X echo "usage: $0 iconfile" >&2
- X exit 1
- Xfi
- X
- X# run echo and then kill it. If the echo is finished, the kill will return a
- X# nonzero exit code. If the kill succeeds, the echo wasn't finished, so
- X# loop back and try again, ad nauseum. Give up after maxtries tries.
- X
- Xexport iconfile
- X(
- X trynum=1
- X maxtries=5
- X status=0
- X while [ $status -eq 0 -a $trynum -le $maxtries ]
- X do
- X echo -n "]I${icon}\\" >/dev/tty &
- X echopid=$!
- X trynum=`expr $trynum + 1`
- X sleep 1
- X kill -9 $! > /dev/null 2>&1
- X status=$?
- X done
- X
- X if [ $trynum -gt $maxtries ]
- X then
- X echo "vmailicon: icon not set after $trynum tries" >&2
- X fi
- X) &
- END_OF_vmailicon
- echo shar: 2 control characters may be missing from \"vmailicon\"
- if test 1270 -ne `wc -c <vmailicon`; then
- echo shar: \"vmailicon\" unpacked with wrong size!
- fi
- chmod +x vmailicon
- # end of overwriting check
- fi
- if test -f vmailtool -a "${1}" != "-c" ; then
- echo shar: Will not over-write existing file \"vmailtool\"
- else
- echo shar: Extracting \"vmailtool\" \(16027 characters\)
- sed "s/^X//" >vmailtool <<'END_OF_vmailtool'
- X:
- X# vmailtool
- X#
- X# James T. Perkins
- X#
- X# $Id: vmailtool,v 1.15 91/03/01 14:03:01 jamesp Exp $
- X
- XTMP=/tmp/vmailtool.$$
- X
- XNOMAILICON="${NOMAILICON:-/usr/include/images/nomail.icon}"
- XMAILICON="${MAILICON:-/usr/include/images/mail.icon}"
- XBOLD_FONT="${BOLD_FONT:-/usr/lib/fonts/fixedwidthfonts/screen.b.14}"
- XREVISION="V`set $Revision: 1.15 $ ; echo \$2`"
- XDATE="`set $Date: 91/03/01 14:03:01 $ ; echo \$2`"
- X
- Xif stty 2>&1 >/dev/tty | grep -s tostop
- Xthen
- X echo "vmailtool: vmailtool and 'stty tostop' are incompatible. See the man page." >&2
- X exit 1
- Xfi
- X
- Xtrap 'status=$?; rm $TMP; exit $status' 0 1 2 15
- X
- Xcat >$TMP <<END-OF-TOOLTOOL-SCRIPT
- X/*
- X * vmailtool $REVISION tooltool file
- X * James Perkins $DATE
- X */
- X
- X#define APPLICATION "vmail"
- X#define VMAILICON "/usr/public/bin/vmailicon"
- X#define ICON_MAIL "$MAILICON"
- X#define ICON_NOMAIL "$NOMAILICON"
- X#define MAIL_LABEL '$MAILICON'
- X#define NOMAIL_LABEL '$NOMAILICON'
- X#define ICON_UP '/usr/public/icons/up'
- X#define ICON_DOWN '/usr/public/icons/down'
- X#define ICON_LEFT '/usr/public/icons/left'
- X#define ICON_RIGHT '/usr/public/icons/right'
- X#define LABEL "Vmail/MH Tool - $REVISION - $DATE - JTP"
- X#define ROW_SIZE 34
- X#define COL_SIZE 80
- X#define BOLD_FONT "$BOLD_FONT"
- X
- X/*
- X * icon_flag_up/icon_flag_down - these strings are echoed to the tty when mail
- X * arrives or is incorporated. They cause the tooltool icon to change to
- X * indicate arrival of mail, or no mail.
- X */
- X
- X#define icon_flag_up format("%s %s", VMAILICON, ICON_MAIL)
- X#define icon_flag_down format("%s %s", VMAILICON, ICON_NOMAIL)
- X
- X/*
- X * types of dialog boxes. We only have one dialog box, and it switch-hits
- X * between each kind of dialog box. This is necessary becuase tooltool
- X * eats up one extra window for each dialog box -- if there were a dialog
- X * box for each one of these, tooltool would eat up a lot of windows.
- X */
- X
- X#define REFILE 0
- X#define COMP 1
- X#define REPL 2
- X#define FORW 3
- X#define SEARCH 4
- X#define NEW_FOLDER 5
- X#define PIPE 6
- X#define DIST 7
- X#define BURST 8
- X#define SORT 9
- X
- X/*
- X * define overall application
- X */
- X
- Xapplication APPLICATION
- Xicon ICON_NOMAIL
- Xlabel LABEL
- Xsize ROW_SIZE by COL_SIZE characters
- X
- X/*
- X * Do the following when we start up
- X */
- Xinitialize {
- X /*
- X * initialize dialog box
- X */
- X
- X dialog_box_first_time = 1;
- X
- X /*
- X * get mpath (path of system maildrop) from MAILPATH, MAIL, or USER
- X * environment variables.
- X */
- X
- X if (length(mpath = getenv("MAILPATH")) > 0) {
- X endpath = index(mpath, "?");
- X mpath = substr(mpath, 1, (endpath - 1));
- X }
- X else if (length(mpath = getenv("MAIL")) > 0) {
- X ;
- X }
- X else {
- X user = getenv("USER");
- X mpath = format("/usr/spool/mail/%s", user);
- X }
- X
- X /*
- X * get NEWMAILCMD environment variable. The shell command in
- X * newmailcmd is executed every time new mail arrives.
- X */
- X
- X newmailcmd = getenv("NEWMAILCMD");
- X lastsize = 0;
- X cursize = 0;
- X
- X /*
- X * Pop up flag (both the icon and the mail label) if there's mail
- X */
- X
- X remove mail_label;
- X if (exists(mpath)) {
- X st = stat(mpath);
- X cursize = st["size"];
- X if (cursize > lastsize) {
- X system(icon_flag_up);
- X remove nomail_label;
- X display mail_label;
- X }
- X }
- X lastsize = cursize;
- X
- X /*
- X * Set up new mail test timer, based on MAILCHECK environment variable.
- X * timeout will never exceed 60 seconds.
- X */
- X
- X if ((interval = getenv("MAILCHECK")) < 60) {
- X interval = 60;
- X }
- X}
- X
- X
- X/*
- X * Do the following when the window is opened
- X */
- X
- Xopen {}
- X
- X/*
- X * Do the following when the window is closed
- X */
- X
- Xclose {}
- X
- X/*
- X * Do the following asychronously, whenever the "interval" timer times out.
- X */
- X
- Xtimer {
- X /*
- X * Pop up flag if there's mail (both icon and mail label)
- X */
- X
- X if (exists(mpath)) {
- X st = stat(mpath);
- X cursize = st["size"];
- X if (cursize > lastsize) {
- X system(icon_flag_up);
- X remove nomail_label;
- X display mail_label;
- X if (length(newmailcmd) > 0) {
- X system(newmailcmd);
- X }
- X }
- X else {
- X if (cursize == 0 && lastsize != 0) {
- X remove mail_label;
- X display nomail_label;
- X }
- X }
- X }
- X lastsize = cursize;
- X}
- X
- X/*
- X * Define all buttons and menus for the application
- X */
- X
- Xgadgets
- X /*
- X * Button labels are right justified and not adjusted.
- X */
- X
- X right
- X ragged
- X
- X /*
- X * Gadgets at default places
- X */
- X
- X button mail_label /* Copy of tooltool icon */
- X at 5 5
- X normal MAIL_LABEL {
- X close;
- X }
- X control "quit" {
- X exit;
- X }
- X end_button
- X button /* incorporate mail */
- X normal "inc" {
- X remove mail_label;
- X display nomail_label;
- X system(icon_flag_down);
- X send "i";
- X }
- X shift "inc show" {
- X remove mail_label;
- X display nomail_label;
- X system(icon_flag_down);
- X send "i ";
- X }
- X end_button
- X label /* blank lines to leave room for arrows */
- X ""
- X end_label
- X label
- X ""
- X end_label
- X label
- X ""
- X end_label
- X label
- X ""
- X end_label
- X label
- X "-MESSAGE-" : BOLD_FONT
- X end_label
- X button /* show current message */
- X normal "show" {
- X send " ";
- X }
- X shift "print" {
- X printer = getenv("PRINTER");
- X if (length(printer) > 0) {
- X printer = format(" -P%s", printer);
- X }
- X send(format("|(echo Printing...; lpr%s)\n ", printer));
- X }
- X control "pipe" {
- X dialog_type = PIPE;
- X popup dialog_box;
- X }
- X end_button
- X button /* delete current message */
- X normal "delete" {
- X send "d";
- X }
- X shift "undo delete" {
- X send "u";
- X }
- X end_button
- X button /* refile current message */
- X normal "refile" {
- X dialog_type = REFILE;
- X popup dialog_box;
- X }
- X shift "again" {
- X if (length(refile_cmd) > 0) {
- X send(refile_cmd);
- X }
- X else {
- X dialog_type = REFILE;
- X popup dialog_box;
- X }
- X }
- X control "to prev folder" {
- X send "R";
- X }
- X end_button
- X label
- X ""
- X end_label
- X button /* compose new message */
- X normal "comp" {
- X send "c\n";
- X }
- X shift "comp..." {
- X dialog_type = COMP;
- X popup dialog_box;
- X }
- X end_button
- X button /* reply to current message */
- X normal "repl" {
- X send "a\n";
- X }
- X shift "repl..." {
- X dialog_type = REPL;
- X popup dialog_box;
- X }
- X end_button
- X button /* forward current message */
- X normal "forw" {
- X send "f\n";
- X }
- X shift "forw..." {
- X dialog_type = FORW;
- X popup dialog_box;
- X }
- X end_button
- X menu "misc"
- X "rescan" {
- X send "^R";
- X }
- X "edit" {
- X send "e";
- X }
- X "burst" {
- X send "b\n";
- X }
- X "burst..." {
- X dialog_type = BURST;
- X popup dialog_box;
- X }
- X "dist" {
- X send "t\n";
- X }
- X "dist..." {
- X dialog_type = DIST;
- X popup dialog_box;
- X }
- X end_menu
- X label
- X ""
- X end_label
- X label
- X "-FOLDER-" : BOLD_FONT
- X end_label
- X button /* search folder for subject line */
- X normal "search" {
- X if (length(search_cmd) > 0) {
- X send(search_cmd);
- X }
- X else {
- X beep;
- X }
- X }
- X shift "forward..." {
- X search_dir = "/";
- X dialog_type = SEARCH;
- X popup dialog_box;
- X }
- X control "backward..." {
- X search_dir = "?";
- X dialog_type = SEARCH;
- X popup dialog_box;
- X }
- X end_button
- X button /* go to new folder */
- X normal "new fold" {
- X dialog_type = NEW_FOLDER;
- X popup dialog_box;
- X }
- X shift "alternate" {
- X if (length(new_folder_cmd) > 0) {
- X send "G";
- X }
- X else {
- X dialog_type = NEW_FOLDER;
- X popup dialog_box;
- X }
- X }
- X end_button
- X Menu "misc" /* misc folder commands */
- X "List All" {
- X send "F";
- X }
- X "Pack" {
- X send "z";
- X }
- X "Sort" {
- X send "S\n";
- X }
- X "Sort..." {
- X dialog_type = SORT;
- X popup dialog_box;
- X }
- X "Inactivate" {
- X send "v";
- X }
- X end_menu
- X
- X /*
- X * Gadgets at particular places
- X */
- X
- X button nomail_label /* copy of tooltool icon */
- X at 5 5
- X normal NOMAIL_LABEL {
- X close;
- X }
- X control "quit" {
- X exit;
- X }
- X end_button
- X button /* make prev message current */
- X at 30 110
- X normal ICON_UP {
- X send "k";
- X }
- X shift "home" {
- X send "H";
- X }
- X end_button
- X button /* go to prev page of messages */
- X at 10 130
- X normal ICON_LEFT {
- X send "\b";
- X }
- X shift "prev folder" {
- X send "p";
- X }
- X end_button
- X button /* go to next page of messages */
- X at 50 130
- X normal ICON_RIGHT {
- X send "\r";
- X }
- X shift "next folder" {
- X send "n";
- X }
- X end_button
- X button /* make next message current */
- X at 30 150
- X normal ICON_DOWN {
- X send "j";
- X }
- X shift "last line" {
- X send "L";
- X }
- X end_button
- Xend_gadgets
- X
- X/*
- X * Here's the dialog box that does everything.
- X * The first time it is opened, it removes everything in it except for
- X * the "done" and "cancel" buttons.
- X * Then, any time it is opened it adds the fields it needs, and when it
- X * is closed it removes them.
- X */
- X
- Xdialog dialog_box
- X size 24 by 43 characters
- X open {
- X if (dialog_box_first_time == 1) {
- X dialog_box_first_time = 0;
- X remove refile_label;
- X remove refile_folder;
- X remove comp_label;
- X remove comp_opts;
- X remove forw_label;
- X remove forw_opts;
- X remove repl_label;
- X remove repl_opts;
- X remove search_label;
- X remove search_regex;
- X remove new_folder_label;
- X remove new_folder;
- X remove pipe_label;
- X remove pipe_cmd;
- X remove burst_label;
- X remove burst_opts;
- X remove dist_label;
- X remove dist_opts;
- X remove sort_label;
- X remove sort_opts;
- X }
- X if (dialog_type == REFILE) {
- X refile_folder = last_refile_folder;
- X display refile_label;
- X display refile_folder;
- X }
- X else if (dialog_type == COMP) {
- X comp_opts = last_comp_opts;
- X display comp_label;
- X display comp_opts;
- X }
- X else if (dialog_type == FORW) {
- X forw_opts = last_forw_opts;
- X display forw_label;
- X display forw_opts;
- X }
- X else if (dialog_type == REPL) {
- X repl_opts = last_repl_opts;
- X display repl_label;
- X display repl_opts;
- X }
- X else if (dialog_type == SEARCH) {
- X search_regex = last_search_regex;
- X display search_label;
- X display search_regex;
- X }
- X else if (dialog_type == NEW_FOLDER) {
- X new_folder = last_new_folder;
- X display new_folder_label;
- X display new_folder;
- X }
- X else if (dialog_type == PIPE) {
- X pipe_cmd = last_pipe_cmd;
- X display pipe_label;
- X display pipe_cmd;
- X }
- X else if (dialog_type == BURST) {
- X burst_opts = last_burst_opts;
- X display burst_label;
- X display burst_opts;
- X }
- X else if (dialog_type == DIST) {
- X dist_opts = last_dist_opts;
- X display dist_label;
- X display dist_opts;
- X }
- X else if (dialog_type == SORT) {
- X sort_opts = last_sort_opts;
- X display sort_label;
- X display sort_opts;
- X }
- X }
- X close {
- X if (dialog_type == REFILE) {
- X remove refile_label;
- X remove refile_folder;
- X }
- X else if (dialog_type == COMP) {
- X remove comp_label;
- X remove comp_opts;
- X }
- X else if (dialog_type == FORW) {
- X remove forw_label;
- X remove forw_opts;
- X }
- X else if (dialog_type == REPL) {
- X remove repl_label;
- X remove repl_opts;
- X }
- X else if (dialog_type == SEARCH) {
- X remove search_label;
- X remove search_regex;
- X }
- X else if (dialog_type == NEW_FOLDER) {
- X remove new_folder_label;
- X remove new_folder;
- X }
- X else if (dialog_type == PIPE) {
- X remove pipe_label;
- X remove pipe_cmd;
- X }
- X else if (dialog_type == BURST) {
- X remove burst_label;
- X remove burst_opts;
- X }
- X else if (dialog_type == DIST) {
- X remove dist_label;
- X remove dist_opts;
- X }
- X else if (dialog_type == SORT) {
- X remove sort_label;
- X remove sort_opts;
- X }
- X }
- X gadgets
- X label refile_label
- X at 5 5
- X "Choose folder to refile to"
- X end_label
- X button
- X normal "OK" {
- X if (dialog_type == REFILE) {
- X refile_cmd = format("r%s\n", refile_folder);
- X send(refile_cmd);
- X last_refile_folder = refile_folder;
- X }
- X else if (dialog_type == COMP) {
- X comp_cmd = format("c%s\n", comp_opts);
- X send(comp_cmd);
- X last_comp_opts = comp_opts;
- X }
- X else if (dialog_type == FORW) {
- X forw_cmd = format("f%s\n", forw_opts);
- X send(forw_cmd);
- X last_forw_opts = forw_opts;
- X }
- X else if (dialog_type == REPL) {
- X repl_cmd = format("a%s\n", forw_opts);
- X send(repl_cmd);
- X last_repl_opts = repl_opts;
- X }
- X else if (dialog_type == SEARCH) {
- X search_cmd = format("%s%s\n",
- X search_dir, search_regex);
- X send(search_cmd);
- X last_search_regex = search_regex;
- X }
- X else if (dialog_type == NEW_FOLDER) {
- X new_folder_cmd = format("g%s\n",
- X new_folder);
- X send(new_folder_cmd);
- X last_new_folder = new_folder;
- X }
- X else if (dialog_type == PIPE) {
- X pipe_cmd_cmd = format("|%s\n",
- X pipe_cmd);
- X send(pipe_cmd_cmd);
- X last_pipe_cmd = pipe_cmd;
- X }
- X else if (dialog_type == BURST) {
- X burst_cmd = format("b%s\n", burst_opts);
- X send(burst_cmd);
- X last_burst_opts = burst_opts;
- X }
- X else if (dialog_type == DIST) {
- X dist_cmd = format("t%s\n", dist_opts);
- X send(dist_cmd);
- X last_dist_opts = dist_opts;
- X }
- X else if (dialog_type == SORT) {
- X sort_cmd = format("S%s\n", sort_opts);
- X send(sort_cmd);
- X last_sort_opts = sort_opts;
- X }
- X remove dialog_box;
- X }
- X end_button
- X text refile_folder
- X display 20
- X completion "\n\e"
- X label "Folder:"
- X action {
- X refile_cmd = format("r%s\n", refile_folder);
- X send(refile_cmd);
- X last_refile_folder = refile_folder;
- X remove dialog_box;
- X }
- X end_text
- X button
- X normal "Cancel" {
- X remove dialog_box;
- X }
- X end_button
- X label comp_label
- X at 5 5
- X "Choose arguments for comp"
- X end_label
- X label forw_label
- X at 5 5
- X "Choose arguments for forw"
- X end_label
- X label repl_label
- X at 5 5
- X "Choose arguments for repl"
- X end_label
- X label search_label
- X at 5 5
- X "Subject line search"
- X end_label
- X label new_folder_label
- X at 5 5
- X "Choose new folder"
- X end_label
- X label pipe_label
- X at 5 5
- X "Pipe message to command"
- X end_label
- X label burst_label
- X at 5 5
- X "Choose arguments for burst"
- X end_label
- X label dist_label
- X at 5 5
- X "Choose arguments for dist"
- X end_label
- X label sort_label
- X at 5 5
- X "Choose arguments for sortm"
- X end_label
- X text comp_opts
- X at 5 30
- X display 20
- X completion "\n\e"
- X label "Arguments:"
- X action {
- X comp_cmd = format("c%s\n", comp_opts);
- X send(comp_cmd);
- X last_comp_opts = comp_opts;
- X remove dialog_box;
- X }
- X end_text
- X text forw_opts
- X at 5 30
- X display 20
- X completion "\n\e"
- X label "Arguments:"
- X action {
- X forw_cmd = format("f%s\n", forw_opts);
- X send(forw_cmd);
- X last_forw_opts = forw_opts;
- X remove dialog_box;
- X }
- X end_text
- X text repl_opts
- X at 5 30
- X display 20
- X completion "\n\e"
- X label "Arguments:"
- X action {
- X repl_cmd = format("a%s\n", repl_opts);
- X send(repl_cmd);
- X last_repl_opts = repl_opts;
- X remove dialog_box;
- X }
- X end_text
- X text search_regex
- X at 5 30
- X display 20
- X completion "\n\e"
- X label "Expression:"
- X action {
- X search_cmd = format("%s%s\n", search_dir,
- X search_regex);
- X send(search_cmd);
- X last_search_regex = search_regex;
- X remove dialog_box;
- X }
- X end_text
- X text new_folder
- X at 5 30
- X display 20
- X completion "\n\e"
- X label "Folder:"
- X action {
- X new_folder_cmd = format("g%s\n", new_folder);
- X send(new_folder_cmd);
- X last_new_folder = new_folder;
- X remove dialog_box;
- X }
- X end_text
- X text pipe_cmd
- X at 5 30
- X display 20
- X completion "\n\e"
- X label "Command:"
- X action {
- X pipe_cmd_cmd = format("|%s\n", pipe_cmd);
- X send(pipe_cmd_cmd);
- X last_pipe_cmd = pipe_cmd;
- X remove dialog_box;
- X }
- X end_text
- X text burst_opts
- X at 5 30
- X display 20
- X completion "\n\e"
- X label "Arguments:"
- X action {
- X burst_cmd = format("b%s\n", burst_opts);
- X send(burst_cmd);
- X last_burst_opts = burst_opts;
- X remove dialog_box;
- X }
- X end_text
- X text dist_opts
- X at 5 30
- X display 20
- X completion "\n\e"
- X label "Arguments:"
- X action {
- X dist_cmd = format("t%s\n", dist_opts);
- X send(dist_cmd);
- X last_dist_opts = dist_opts;
- X remove dialog_box;
- X }
- X end_text
- X text sort_opts
- X at 5 30
- X display 20
- X completion "\n\e"
- X label "Arguments:"
- X action {
- X sort_cmd = format("S%s\n", sort_opts);
- X send(sort_cmd);
- X last_sort_opts = sort_opts;
- X remove dialog_box;
- X }
- X end_text
- X end_gadgets
- Xend_dialog
- X
- X/*
- X * Move cursor to message that the mouse points to.
- X */
- X
- Xmouse
- X base 0 characters
- X button left
- X normal {
- X scanline = mouse_y - 1;
- X send "H";
- X while (scanline-- > 1) {
- X send "j";
- X }
- X }
- X shift {
- X scanline = mouse_y - 1;
- X send "H";
- X while (scanline-- > 1) {
- X send "j";
- X }
- X send " ";
- X }
- X end_button
- Xend_mouse
- XEND-OF-TOOLTOOL-SCRIPT
- X
- Xexec tooltool -f $TMP "$@"
- END_OF_vmailtool
- if test 16027 -ne `wc -c <vmailtool`; then
- echo shar: \"vmailtool\" unpacked with wrong size!
- fi
- chmod +x vmailtool
- # end of overwriting check
- fi
- if test -f vmailtool.1 -a "${1}" != "-c" ; then
- echo shar: Will not over-write existing file \"vmailtool.1\"
- else
- echo shar: Extracting \"vmailtool.1\" \(9888 characters\)
- sed "s/^X//" >vmailtool.1 <<'END_OF_vmailtool.1'
- X.TH VMAILTOOL 1 "" "$Date: 91/03/08 13:27:32 $" "LAD"
- X.\" Vmailtool, version 1.4
- X.\" James T. Perkins 4/90
- X.SH NAME
- Xvmailtool
- X-
- Xrun vmail in a sunview window
- X.SH SYNOPSIS
- X.B vmailtool
- X[
- Xvmail-options
- X]
- X.\" UCB, in its infinite wisdom, left much
- X.\" brilliance out of the man macros. I attempt to
- X.\" make up for bits of it here.
- X.\" R returns you to Roman typeface (since there
- X.\" is no correct way to undo .B or .I)
- X.de R
- X.if n .ul 0
- X.ft 1
- X..
- X.\" DS starts an indented display
- X.\" (starts with a blank line)
- X.de DS
- X.sp
- X.RS
- X.nf
- X..
- X.\" DE ends an indented display
- X.de DE
- X.fi
- X.RE
- X..
- X.\" SP/EP is a replacement for the IP function,
- X.\" which doesn't fold the tag if it's too long to
- X.\" fit on one line.
- X.de SP
- X.if \\n(sp .RE
- X.nr sp 1
- X.LP
- X\\$1
- X.br
- X.RS
- X..
- X.de EP
- X.nr sp 0
- X.RE
- X..
- X.SH DESCRIPTION
- X.I Vmailtool
- Xinvokes the MH-based
- X.I vmail
- Xmail editor in a sunview
- X.I tooltool
- Xwindow.
- XIt provides buttons for incorporating,
- Xshowing,
- Xprinting,
- Xpiping to a command,
- Xbursting,
- Xdeleting,
- Xrefiling,
- Xforwarding,
- Xdisting
- X(resending),
- Xand replying to mail.
- XIt provides functions for searching,
- Xmoving to,
- Xlisting,
- Xpacking,
- Xsorting,
- Xand inactivating folders.
- XIt has the capability to resync the mail item listing with
- Xwhat's really in the mh mail folder.
- XIt even provides an animated mail icon with the flag that
- Xpops up and down based on whether you have mail or not.
- X.LP
- X.I Mouse
- X.LP
- XIf you are looking at a scan listing,
- Xyou can click the left mouse button on a message and the
- Xcursor will move to that message.
- X.LP
- XIf you shift-click the left mouse button,
- Xit will move to and
- X.B show
- Xthe message.
- X.LP
- XIf you control-click the left mouse button,
- Xthe mouse will do the familiar text selection action.
- X.LP
- X.I "Mailbox icon"
- X.LP
- XIf you click on the mailbox icon,
- Xthe window will close.
- XIf you shift-click,
- X.I vmailtool
- Xexits.
- X.LP
- X.I "Inc button"
- X.LP
- XIf you click on the inc button,
- Xmail will be incorporated.
- XIf you shift-click,
- Xmail will be inc'ed and the first message will be show'ed.
- X.LP
- X.I "Arrows"
- X.LP
- XIf you wish to go to the next/previous message,
- Xclick on the up/down arrows.
- X.LP
- XIf you wish to go to the top/bottom of the page,
- Xshift-click on the up/down arrows.
- X.LP
- XIf you wish to move forward/backward pages of active
- Xmessages,
- Xclick on the left and right arrows.
- X.LP
- XIf you wish to move forward/backward to the next/previous
- Xfolder,
- Xshift-click on the right and left arrows.
- X.LP
- X.I "Show button"
- X.LP
- XIf you click on the show button,
- Xit show's the mail.
- XFurther clicks advance the pager by one page.
- XIf you shift-click,
- Xthe mail is printed on your favorite printer
- X(default is lpr).
- XIf you control-click,
- Xyou are asked to specify a command to pipe the mail to.
- X.LP
- X.I "Delete button"
- X.LP
- XA click deletes the current message.
- XA shift-click will restore the last message deleted.
- X.LP
- X.I "Refile button"
- X.LP
- XA click pops up a dialog box to ask you into which folder you
- Xwish to refile the mail.
- XA shift-click will refile the mail to the same folder as last
- Xtime.
- XA control-click will refile the mail to the
- Xpreviously-visited folder.
- X.LP
- X.I "Comp button"
- X.LP
- XA click composes a new message.
- XA shift-click prompts you for arguments to give to comp.
- X.LP
- X.I "Repl button"
- X.LP
- XA click replies to the current message.
- XA shift-click prompts you for arguments to give to repl.
- X.LP
- X.I "Forw button"
- X.LP
- XA click forwards the current message.
- XA shift-click prompts you for additional arguments to give to
- Xforw
- X(forward additional messages,
- Xfor example).
- X.LP
- X.I "Misc message menu"
- X.LP
- XHold down the right mouse button to open the menu for
- Xselections.
- X.LP
- X.B "Rescan"
- XCauses
- X.I vmail
- Xto refresh its scan listing to match what is really in the
- Xcurrent MH mail folder.
- X.LP
- X.B "Edit"
- XRuns your favorite editor on the current message.
- X.LP
- X.B "Burst"
- XBursts the current message.
- XIf the current message is a digest or contains forwarded
- Xmail,
- Xthe individual internal messages are split out and placed at
- Xthe end of your mail folder.
- XUses the MH
- X.I burst
- Xprogram.
- X.LP
- X.B "Burst..."
- XPrompts you for arguments to pass to burst.
- X.LP
- X.B "Dist"
- XDists
- X(resends)
- Xthe current message.
- XIf a message was sent to you that you wish to send on to
- Xadditional recipients,
- Xwithout including it as a forwarded message,
- Xthis menu item is for you.
- XUses the MH
- X.I dist
- Xprogram.
- X.LP
- X.B "Dist..."
- XPrompts you for arguments to pass to dist.
- X.LP
- X.I "Search button"
- X.LP
- XA click repeats the last
- X(forward or backward)
- Xsearch on the current folder's scan listing.
- XA shift-click prompts you for a string to search for,
- Xthen performs the search,
- Xforward.
- XA control-click prompts you for a string to search for,
- Xthen performs the search,
- Xbackwards.
- X.LP
- X.I "New Folder button"
- X.LP
- XA click prompts you for a new folder to activate and visit.
- XA shift-click sends you back to the previously-visted folder.
- X.LP
- X.I "Misc folder menu"
- X.LP
- XHold down the right mouse button to open the menu for
- Xselections.
- X.LP
- X.B "List All"
- Xlists all the folders
- X.I vmail
- Xknows about,
- Xand whether they are active or not.
- XIf they are active,
- Xit lists how many messages are in the folder.
- X.LP
- X.B "Pack"
- XRenumbers the messages in the current folder so there are no
- Xmessage number gaps.
- X.LP
- X.B "Sort"
- XSorts all messages in the current folder by date,
- Xthen rescans the mail folder.
- XUses the MH
- X.I sortm
- Xprogram.
- X.LP
- X.B "Sort..."
- XLike
- X.B Sort
- Xabove,
- Xbut allows you to specify options to pass to sortm.
- X.LP
- X.B "Inactivate"
- XRemoves the current folder from the active list of folders.
- XIf other folders were active
- X(from using the New Folder button),
- Xyou will go to the alternate folder;
- Xotherwise,
- X.I vmailtool
- Xwill exit.
- X.LP
- XNote that as with any
- X.I tooltool
- Xapplication,
- Xif you hold down the right mouse button while the pointer is
- Xover one of the
- X"buttons",
- X.I vmailtool
- Xwill list all the different functions of that button,
- Xand what shift-key is used to invoke that function:
- X.B S
- Xfor Shift,
- X.B C
- Xfor Control,
- Xand
- X.B M
- Xfor Meta.
- XOr,
- Xif you place the mouse over one of the selections so it is
- Xhighlighted,
- Xand release the right mouse button,
- Xthat selection will be run.
- X.SH OPTIONS
- X.LP
- XTakes the standard
- X.I vmail
- Xoptions.
- XBeware of using
- X-ans,
- X-burst,
- X-comp,
- X-dist,
- X-forw,
- Xand
- X-sort,
- Xas these will mess up the repl,
- Xburst,
- Xcomp,
- Xdist,
- Xforw,
- Xand sort functions.
- X.SH ENVIRONMENT
- X.SP \fINEWMAILCMD\fR
- XString containing a shell command to run everytime new mail
- Xarrives.
- X.DS
- XNEWMAILCMD="cat soundfile > /dev/audio"
- X.DE
- X.EP
- X.SP \fIPRINTER\fR
- XThe printer of choice for the print function of the show
- Xbutton.
- XThe default printer is
- X"lp".
- XTo select
- X"lprn"
- Xas the default,
- Xfor example:
- X.DS
- XPRINTER="lprn"
- X.DE
- X.EP
- X.SP "\fIMAILPATH, MAIL, USER\fR"
- XWhere to find the user's mailbox.
- XFirst choice is
- X.I MAILPATH
- X(see
- X.I ksh(1)),
- Xthen
- X.I MAIL,
- Xthen
- X.I /usr/spool/mail/$USER.
- X.EP
- X.SP "\fIMAILCHECK\fR"
- XInterval in seconds to wait between checking for mail.
- XThe default is 60 seconds.
- X.EP
- X.SP "\fIMAILICON\fR"
- XPathname of full-size sunview icon file to use to indicate
- Xthat the user's system maildrop has mail in it.
- X.EP
- X.SP "\fINOMAILICON\fR"
- XPathname of full-size sunview icon file to use to indicate
- Xthat the user's system maildrop is empty.
- X.EP
- X.SP "\fIBOLD_FONT\fR"
- XPathname of font file to use for the bold-face font.
- X.EP
- X.SH FILES
- X.SP \fI/usr/include/images/mail.icon\fR
- XDefault
- X.I MAILICON.
- X.EP
- X.SP \fI/usr/include/images/nomail.icon\fR
- XDefault
- X.I NOMAILICON.
- X.EP
- X.SP \fI/usr/lib/fonts/fixedwidthfonts/screen.b.14\fR
- XDefault
- X.I BOLD_FONT.
- X.EP
- X.SP \fI/usr/public/bin/vmailicon\fR
- XShell script to set the window icon associated
- Xwith /dev/tty. This script attempts to outsmart the
- Xwindow lock race condition bug by firing off
- X"echo" and then killing it.
- X.EP
- X.SH SEE ALSO
- Xvmail(1),
- Xmh(1),
- Xinc(1),
- Xksh(1),
- Xtooltool(1).
- X.SH AUTHOR
- XJames T.
- XPerkins
- X(jamesp@metolius.wr.tek.com),
- XMarch 1990.
- XVersion 1.4,
- X20 September 1990.
- X.SH DIAGNOSTICS
- X.SP "vmailicon: nnnn Killed"
- XThis indicates that
- X.I vmailicon
- Xcouldn't set the window icon
- X(probably to raise or lower the flag),
- Xand is retrying.
- X.EP
- X.SP "vmailicon: icon not set after X tries"
- XIndicates that
- X.I vmailicon
- Xcouldn't set the window icon after repeated attempts.
- XThe mailbox flag on the icon will not reflect reality
- Xuntil it is able to.
- X.EP
- X.SP "vmailtool: vmailtool and 'stty tostop' are incompatible. See the man page."
- X.I Vmailtool
- Xdoes not run correctly if you have the
- X.I tostop
- Xfunction of the tty driver engaged.
- XCheck your
- X.I .profile
- Xand
- X.I .login
- Xto see if
- X.I tostop
- Xis turned on there.
- XYou will probably want to edit these occurances to read
- X.I \fB\-\fPtostop
- Xinstead,
- Xthen log out and back in again,
- Xto reset your tty driver to the proper mode permanently.
- X.EP
- X.SH BUGS
- X.LP
- XEditor sessions invoked when you compose,
- Xedit,
- Xor reply to mail,
- Xwill hang if a suspend signal is sent to the process via ^Z.
- X.LP
- XOne cannot add functions not already supported by
- X.I vmail.
- X.LP
- XBecause tooltool scripts are very loosely coupled to the
- Xapplication running underneath them,
- Xit is not easy,
- Xor possible,
- Xto change the set of buttons to more accurately reflect the
- Xcurrent mode of operation
- X("show"
- Xmode,
- X"edit"
- Xmode,
- X"scan"
- Xmode,
- Xfolder selection mode,
- Xetc).
- X.LP
- X.I Vmail
- Xwill immediately exit if there is no mail in your
- X"inbox"
- Xfolder.
- XSimilarly,
- X.I vmail
- Xwill exit if you have inactivated the last active folder,
- Xor if you rescan the last active folder,
- Xwhen it has just been emptied of messages.
- X.LP
- X.I Vmail
- Xwill get confused if you run MH commands that change the
- Xcontents of the current folder in another Sunview window.
- XTo resync
- X.I vmail
- Xwith the contents of the MH folder,
- Xuse the
- X.B rescan
- Xfunction of the
- X.I "Misc folder menu."
- X.LP
- X.I Vmail
- Xis designed to flush type-ahead by default.
- XSometimes when you press a button,
- X.I vmailtool
- Xwill emit a stream of characters so fast that
- X.I vmail
- Xflushes the first one or two,
- Xleading to unpredictable
- X.I vmail
- Xbehavior.
- XMost people don't experience this behavior,
- Xbut if it happens to you,
- Xadd a line of the form:
- X.sp
- X.DS
- X\fCvmail: -flush\fP
- X.DE
- X.LP
- XTo your
- X.B .mh-profile.
- END_OF_vmailtool.1
- if test 9888 -ne `wc -c <vmailtool.1`; then
- echo shar: \"vmailtool.1\" unpacked with wrong size!
- fi
- # end of overwriting check
- fi
- echo shar: End of archive 1 \(of 1\).
- cp /dev/null ark1isdone
- MISSING=""
- for I in 1 ; do
- if test ! -f ark${I}isdone ; then
- MISSING="${MISSING} ${I}"
- fi
- done
- if test "${MISSING}" = "" ; then
- echo You have unpacked all 1 archives.
- rm -f ark[1-9]isdone
- else
- echo You still need to unpack the following archives:
- echo " " ${MISSING}
- fi
- ## End of shell archive.
- exit 0
-